EnumConstraint

Alias for check constraint that makes sure the property that has this attribute only contains a member that is part of the enumeration. This should act like the ENUM constraint in MySQL. This does modify the value coming in. This is only for strings.

If isStrict is true, EnumConstraint will return false if you include a value not in the enumeration. If isStrict is false, the value will be set to an empty string.

  1. template EnumConstraint(values...)
    template EnumConstraint (
    values...
    ) if (
    isExpressions!values
    ) {}
  2. template EnumConstraint(bool isStrict, values...)

Members

Aliases

EnumConstraint
alias EnumConstraint = EnumConstraint!(true, values)
Undocumented in source.

Meta

Version

\>= 0.0.6